package com.placement.refresh.batch;

import com.placement.refresh.util.Constants;
import com.placement.refresh.util.RefreshUtil;

/**
 * purpose: This class process jobs. It will be run by autosys script
 * 
 * @author Amit Chadha
 *
 */
public class RefreshProcessJobs extends RefreshDataProcess {

	@Override
	/**
	 * purpose: This method checks whether processJobs is complete.
	 * 			If yes exit
	 * 			if no start processJobs
	 */
	public void startBatch() {
		//if(!getRefreshBatchService().isProcessCompleted(RefreshUtil.getProcessId(Constants.REFRESH_JOBS_STEP))){
			getRefreshBatchService().processJobs();
		//}
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		 RefreshDataProcess refreshProcess = (RefreshDataProcess) context.getBean("refreshProcessJobs");		 
		 refreshProcess.startBatch();
	}

}
